import Vue from 'vue'
import Router from 'vue-router'
// import home from '@/components/home'
// import active from '@/components/active'

// 仪表盘
import dashboard from '@/page/dashboard'

// 首页
import login from '@/page/login/login'

// 全部内容
import baseView from '@/layout/base-view'
// 右边内容
import rightComment from '@/layout/right-comment'

// 内容管理
  import manageArticle from '@/page/content/manage-article' 
  import manageComment from '@/page/content/manage-comment'
  import manageImage from '@/page/content/manage-image'
  import postArticle from '@/page/content/post-article'

// 用户管理
  import email from '@/page/user/email' 
  import info from '@/page/user/info' 
  import list from '@/page/user/list' 
  import resetPassWord from '@/page/user/reset-pass-word' 

// 运营
  import category from '@/page/operation/category' 
  import loop from '@/page/operation/loop' 

// 设置
  import friendLink from '@/page/settings/friend-link' 
  import sebsizeInfo from '@/page/settings/sebsize-info' 

Vue.use(Router)
export default new Router({
  routes: [
    {
      path: '',
      name: 'baseView',
      component: baseView,
      children:[
        // {
        //   path: 'page/dashboard',
        //   name: 'dashboard',
        //   component: dashboard,
        // },
        {
          path: '/page/login',
          name: 'login',
          component: login,
          hidden:true,
          name:"首页",
          icon:"el-icon-s-home"
        },
        {
          path: 'page/content',
          name: 'rightComment',
          component: rightComment,
          hidden:true,
          name:"内容管理",
          icon:"el-icon-s-order",
          children:[
            {
              path: 'manage-article',
              name: 'manageArticle',
              component: manageArticle,
              hidden:true,
              name:"文章管理",
              icon:"el-icon-tickets"
            }, 
            {
              path: 'manage-comment',
              name: 'manageComment',
              component: manageComment,
              hidden:true,
              name:"评论管理",
              icon:"el-icon-s-comment"
            }, 
            {
              path: 'manage-image',
              name: 'manageImage',
              component: manageImage,
              hidden:true,
              name:"图片管理",
              icon:"el-icon-picture-outline"
            }, 
            {
              path: 'post-article',
              name: 'postArticle',
              component: postArticle,
              hidden:true,
              name:"文章发表",
              icon:"el-icon-document"
            },
          ]
        },
        {
          path: 'page/user',
          name: 'rightComment',
          component: rightComment,
          hidden:true,
          name:"用户",
          icon:"el-icon-user",
          children:[
            {
              path: 'email',
              name: 'email',
              component: email,
              hidden:true,
              name:"邮箱",
              icon:"el-icon-message"
            }, 
            {
              path: 'info',
              name: 'info',
              component: info,
              hidden:true,
              name:"管理员信息",
              icon:"el-icon-s-custom"
            }, 
            {
              path: 'list',
              name: 'list',
              component: list,
              hidden:true,
              name:"列表",
              icon:"el-icon-s-grid"
            }, 
            {
              path: 'reset-pass-word',
              name: 'reset-pass-word',
              component: resetPassWord,
              hidden:true,
              name:"密码重置",
              icon:"el-icon-lock"
            },
          ]
        },
        {
          path: 'page/operation',
          name: 'rightComment',
          component: rightComment,
          hidden:true,
          name:"设置",
          icon:"el-icon-setting",
          children:[
            {
              path: 'category',
              name: 'category',
              component: category,
              hidden:true,
              name:"分类管理",
              icon:"el-icon-document-copy"
            }, 
            {
              path: 'loop',
              name: 'loop',
              component: loop,
              hidden:true,
              name:"轮播图管理",
              icon:"el-icon-bangzhu"
            }
          ]
        },
        {
          path: 'page/settings',
          name: 'rightComment',
          component: rightComment,
          hidden:true,
          name:"运营",
          icon:"el-icon-s-data",
          children:[
            {
              path: 'friend-link',
              name: 'friend-link',
              component: friendLink,
              hidden:true,
              name:"友情链接",
              icon:"el-icon-link"
            }, 
            {
              path: 'sebsize-info',
              name: 'sebsize-info',
              component: sebsizeInfo,
              hidden:true,
              name:"网站信息",
              icon:"el-icon-postcard"
            }
          ]
        }
      ]
    }
  ]
})
